package com.aistar.service.myfoot.impl;

import com.aistar.mapper.TravCollectMapper;
import com.aistar.pojo.TravCollect;
import com.aistar.pojo.TravCollectExample;
import com.aistar.service.myfoot.CollectionService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shkstart
 * @date 2019/10/12 - 22:28
 */
@Service
public class CollectionServiceImpl implements CollectionService {
    @Autowired
    private TravCollectMapper travCollectMapper;
    @Override
    public List<TravCollect> getCollection(int userId) {
        TravCollectExample travCollectExample = new TravCollectExample();
        TravCollectExample.Criteria criteria = travCollectExample.createCriteria();
        criteria.andCollectUserIdEqualTo(userId);
        return travCollectMapper.selectByExample(travCollectExample);
    }
}
